import React,{Component} from 'react'
import {Button} from 'antd-mobile'
import {getUserList} from '../../http/request'
import style from './AxiosTest.module.less'
export default class AxiosTest extends Component{
    constructor(props){
        super(props)
      this.state={
        val: ''
      }

    }
  changeInput(e){
    this.setState({
      val:e.target.value
    })
  }
  getUserList(){
    getUserList({page:1}).then(res=>{

    }).catch(()=>{

    })
  }
    render (){
        return (
            <div>
              <div className={style.box}></div>
              <p>大家好</p>
              <Button onClick={()=>{this.getUserList()}}>getUserList</Button>
              <input type="text" value={this.state.val} onChange={(e)=>this.changeInput(e)}/>
            </div>
        )
    }
}
